import { isSurveyComName, type Status } from '@/types'

// 返回问卷题目的序号的数组
export function useSurveyNo(coms: Status[]) {
  return computed(() => {
    let queNum = 1
    return coms.map((item) => {
      if (isSurveyComName(item.name)) {
        return queNum++
      }
      return null
    })
  })
  // [1,2,null,3]
}
